//
//  WZCButton.swift
//  XMYouPin
//
//  Created by 王宗成 on 2019/8/1.
//  Copyright © 2019 王宗成. All rights reserved.
//

import UIKit

class WZCButton: UIControl {

    /*
    // Only override draw() if you perform custom drawing.
    // An empty implementation adversely affects performance during animation.
    override func draw(_ rect: CGRect) {
        // Drawing code
    }
    */
    
    override init(frame: CGRect) {
        
        super.init(frame: frame)
        
        self.imgView.snp.makeConstraints { (make) in
            make.top.centerX.equalToSuperview()
        }
        self.titleLabel.snp.makeConstraints { (make) in
            make.bottom.centerX.equalToSuperview()
        }
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    public lazy var imgView : UIImageView = {
        let imageView = UIImageView()
        self.addSubview(imageView)
        return imageView
    }()
    
    public lazy var rightImgView : UIImageView = {
        let imageView = UIImageView()
        self.addSubview(imageView)
        return imageView
    }()
    
    public lazy var titleLabel : UILabel = {
        let label = UILabel()
        label.font = UIFont.systemFont(ofSize: 12)
        label.textColor = UIColor.hexColor(hexadecimal: "#000000")
        label.textAlignment = NSTextAlignment.center
        self.addSubview(label)
        return label
    }()

}
